package com.hxzy.common.vo;

import com.github.pagehelper.Page;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.List;

/**
 * 
 *  返回分页数据信息
 */
@Getter
@Setter
@ApiModel(description = "分页结果")
public class PageResultVO {
    @ApiModelProperty(value = "总记录数")
	private long total;			// 总记录数
    @ApiModelProperty(value = "当前页的数据")
	private List<?> rows;		// 每行显示的内容

    public PageResultVO(){

    }

    public PageResultVO(Page page){
        this.total=page.getTotal();
        this.rows=page.getResult();
    }

}
